﻿@model EUTmvc.Models.AccountInfoModel
@{
    ViewBag.Title = "Thông Tin Tài Khoản";
}
<div class="col-md-8 col-md-offset-2">
    <div class="page-header">
        <h2>@ViewBag.Title</h2>
    </div>

    <div>
        @using (Html.BeginForm("AccountInfo", "Account", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            @Html.AntiForgeryToken()
            <div class="form-group">
                <label class="col-md-10">Bạn vui lòng điền đầy đủ các thông tin dưới đây:</label>
            </div>
            <div class="form-group">
                <div class="col-md-5 col-md-offset-3">
                    <small>
                        @Html.ValidationSummary(true, "Có lỗi xảy ra. Vui lòng thử lại sau!", new { @class = "help-block" })
                    </small>
                </div>
            </div>   
            <div class="form-group">
                @Html.LabelFor(m => m.LastName, new { @class = "col-md-3 control-label" })
                <div class="col-md-5">
                    @Html.TextBoxFor(m => m.LastName, new { @class = "form-control" })
                    <small>
                        @Html.ValidationMessageFor(m => m.LastName, null, new { @class = "help-block" })
                    </small>
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Name, new { @class = "col-md-3 control-label" })
                <div class="col-md-5">
                    @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })
                    <small>
                        @Html.ValidationMessageFor(m => m.Name, null, new { @class = "help-block" })
                    </small>
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.DateOfBirth, new { @class = "col-md-3 control-label" })
                <div class="col-md-5">
                    @Html.TextBoxFor(m => m.DateOfBirth, new { @class = "form-control datepicker" })
                    <small>
                        @Html.ValidationMessageFor(m => m.DateOfBirth, null, new { @class = "help-block" })
                    </small>
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Sex, new { @class = "col-md-3 control-label" })
                <div class="row col-md-5" style="margin-bottom: 7px;">
                    <div class="col-md-6">
                        <label class="radio-inline">
                            @Html.RadioButtonFor(m => m.Sex, true)Nam    
                        </label>
                    </div>
                    <div class="col-md-6">
                        <label class="radio-inline">
                            @Html.RadioButtonFor(m => m.Sex, false)Nữ    
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Address, new { @class = "col-md-3 control-label" })
                <div class="col-md-5">
                    @Html.TextBoxFor(m => m.Address, new { @class = "form-control" })
                    <small>
                        @Html.ValidationMessageFor(m => m.Address, null, new { @class = "help-block" })
                    </small>
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.PhoneNumber, new { @class = "col-md-3 control-label" })
                <div class="col-md-5">
                    @Html.TextBoxFor(m => m.PhoneNumber, new { @class = "form-control" })
                    <small>
                        @Html.ValidationMessageFor(m => m.PhoneNumber, null, new { @class = "help-block" })
                    </small>
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.Image, new { @class = "col-md-3 control-label" })
                <div class="col-md-5">
                    @Html.TextBoxFor(m => m.File, new { @type = "file", @accept = "image/*" })
                    <small>
                        @Html.ValidationMessageFor(m => m.File, null, new { @class = "help-block" })
                    </small>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-5 col-md-offset-3">
                    <small>
                        @if (ViewBag.Message != null)
                        {
                            <div class="alert alert-error">
                                <a class="close" data-dismiss="alert" href="#">×</a>@Html.Raw(ViewBag.Message.ToString())
                            </div>
                        }
                    </small>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-5 col-md-offset-3">
                    <button type="submit" class="btn btn-default">Cập nhật thông tin</button>
                </div>
            </div>
        }
    </div>
</div>
